<?



//Pour savoir le tropic
$query ="SELECT tropic_id,tropic_forum FROM cdn_forum_tropic WHERE tropic_id=$_USER_FORUM_TROPIC";
$resultat=mysql_query($query);
$tropic =mysql_fetch_array($resultat);
            
//Pour savoir le forum
$query="SELECT forum_id,forum_modo FROM cdn_forum_forum WHERE forum_id=$tropic[1]";
$resultat=mysql_query($query);
$forum =mysql_fetch_array($resultat);

//Savoir si l'user est modo
$DRAP_USER="-".$_USER_ID."-";
$forum_modo=substr_count($forum[1],$DRAP_USER);

IF ($forum_modo!=0){
       $pass_admin=1;  //Pour s'assurer qu'il ne passe pas outre cette page pour l'admin
       SWITCH ($action){
             CASE 'lock':
                  $_SESSION_VAR_PAGE="lock_tropic";
                  SESSION_REGISTER("$_SESSION_VAR_PAGE");
                  REQUIRE("include/test.php");
             BREAK;
             CASE 'unlock':
                  $_SESSION_VAR_PAGE="unlock_tropic";
                  SESSION_REGISTER("$_SESSION_VAR_PAGE");
                  REQUIRE("include/test.php");
             BREAK;
             CASE 'delete':
                  $_SESSION_VAR_PAGE="del_tropic";
                  SESSION_REGISTER("$_SESSION_VAR_PAGE");
                  REQUIRE("include/test.php");
             BREAK;
             CASE 'move':
             
                  $_SESSION_VAR_PAGE="tropic_move";
                  SESSION_REGISTER("$_SESSION_VAR_PAGE");
                  TITRE('Transferer un sujet.');
                       $TMP="<form name=form1 method=post action=\"\"><p>";
                  $TMP.="</p>";
                  $TMP.="<CENTER><select name=\"forum\" class=select_site>";


                   $query="SELECT forum_id,forum_name,forum_cat,forum_info,forum_priver,forum_modo,forum_view FROM cdn_forum_forum order by forum_order";
                   $resultat=mysql_query($query);
                  $DRAP_USER="-".$_USER_ID."-";
                WHILE ($forum=mysql_fetch_array($resultat)){

             //savoir si c'est un modo de ce forum.
             $forum_modo2=substr_count($forum[5],$DRAP_USER);
             //Savoir si il peut le voir.
             $forum_view2=substr_count($forum[6],$DRAP_USER);
             $acces=0;


             IF ($forum_modo2!=0 && $forum_view2!=0){ $acces=1; }

             IF (($forum[4]==1 && $acces==1) || $forum[4]==0){
                              IF ($_USER_FORUM_FORUM==$forum[0]){$SEL="selected";}
                              ELSE{$SEL=NULL;}

                              $TMP.="<option value=\"$forum[0]\" $SEL>$forum[1]</option>";


             }

}//Fin du while $forum

$TMP.="</select>";


          $TMP.="<input name=\"p\" type=\"hidden\" id=\"p\" value=\"test2\">";
         $TMP.="<input name=\"SID\" type=\"hidden\" id=\"SID\" value=\"$SID\">";
     $TMP.="</BR></BR><input type=submit name=Submit value=Envoyer>
  </p>
</form></CENTER>";
                  
                  
    base_TD('Choix d\'un forum pour le transfert',$TMP);
             BREAK;


        }//Fin du switch action.
}// fin du $forum_modo!=0
ELSE{
              $TITRE_TD="ERREUR";
             $FOND_TD="Vous n'avez aucun droit administratif sur ce forum.";
             base_TD($TITRE_TD,$FOND_TD);
}





?>
